<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <base href="<%=basePath%>">

    <title>资源下载</title>
    <link type="text/css" href="css/base.css" rel="stylesheet"/>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">

    <script type="text/javascript" src="js/jquery.min.js"></script>
    <script type="text/javascript" src="../js/menu.js"></script>
    <!--
    <link rel="stylesheet" type="text/css" href="styles.css">
    -->

</head>

<body>
<%@ include file="/page/share/menu.jsp" %>

<div id="content">
    <h2>下载文件</h2>

    <hr style="clear: both;">
    <form action="FileDownload.action" method="post">
        <table>
            <s:if test="#session.flag==1">
            <tr>
                <td style="text-align:right;">状态:&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp</td>
                <td colspan="2" style="width: 400px;height: 50px;">

                        <span style="float: left;"><img src="../img/waitAuditing.png"></span>
                        <s:if test="#session.valid=='审核通过'">
                            <span ><img src="../img/succeedAuditing.png" alt="succeed.png"></span>
                        </s:if>
                        <s:if test="#session.valid=='审核失败'">
                            <span><img src="../img/failAuditing.png" alt="succeed.png"></span>
                        </s:if>

                </td>
            </tr>
            </s:if>
            <tr style="height: 25px;">
                <td style="text-align: right;">文件名:&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp</td>
                <td style="width: 400px;">
                    ${resource.fileName}

                </td>
            </tr>
            <tr style="height: 25px;">
                <td style="text-align: right;height: 25px;">上传者:&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp</td>
                <td style="width: 400px;">
                    ${resource.uploader}
                </td>
            </tr>
            <tr style="height: 25px;">
                <td style="text-align: right;">上传时间:&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp</td>
                <td style="width: 400px;">
                    ${resource.uploadTime}
                </td>
            </tr>
            <tr style="height: 25px;">
                <td style="text-align: right;">下载次数:&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp</td>
                <td style="width: 400px;">
                    ${resource.downloadTime}
                </td>
            </tr>
            <tr style="height: 25px;">
                <td style="text-align: right;">介绍:&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp</td>
                <td style="width: 400px;">
                    ${resource.introduction}
                </td>
            </tr>
        </table>
    </form>
    <div id="btn" style="margin:20px 0px 20px 300px;">
        <a href="FileDownload!watch.action?resourceId=${resource.resourceId}" onMouseOver="this.style.background='#2569c1'" onmouseout="this.style.background='#114a93'"
           style="padding:5px 20px;font-family:'微软雅黑';font-size:14px;text-decoration:none;border: none;background: #2569c1;color: white;font-size: 16px;">在线预览</a>
        <s:if test="#session.person!=null">
            <a href="FileDownload.action?resourceId=${resource.resourceId}&filePath=${resource.filePath}" onMouseOver="this.style.background='#2569c1'" onmouseout="this.style.background='#114a93'"
               style="padding:5px 20px;font-family:'微软雅黑';font-size:14px;text-decoration:none;border: none;background: #2569c1;color: white;font-size: 16px;" >点击下载</a>
            <s:if test="#session.valid=='等待审核'">
                <a href="FileDownload!delete.action?resourceId=${resource.resourceId}" onMouseOver="this.style.background='#2569c1'" onmouseout="this.style.background='#114a93'"
                   style="padding:5px 20px;font-family:'微软雅黑';font-size:14px;text-decoration:none;border: none;background: #2569c1;color: white;font-size: 16px;">删除</a>
            </s:if>
        </s:if>
    </div>
</div>

<div id="footer">
    <p style="text-align: center;color: #757575;padding: 20px 0px 0px 0px; font:12px;">Copyright © 2010-2013 蓝天白云团队
        版权所有</p>
</div>
</body>
</html>
